/*
 * 人人信用管理有限公司版权所有.
 * 
 * @Description:
 * 
 * @author: liyuliang
 * 
 * @date: 20 Apr 2017 10:44:16 am
 * 
 * 注意：本内容仅限于人人信用管理有限公司内部传阅，禁止外泄以及用于其他的商业目的.
 */

package com.rrx360.common.exception;

public class RException extends RuntimeException {

  private String code;

  private String info;

  private String module;

  public String getCode() {
    return code;
  }

  public void setCode(String code) {
    this.code = code;
  }



  public String getModule() {
    return module;
  }

  public void setModule(String module) {
    this.module = module;
  }

  public RException(Throwable cause, String module, String code, String info, Object... objects) {
    super(code + " " + (info != null && objects != null ? String.format(info, objects) : info),
        cause);
    this.module = module;
    this.code = code;
    this.info = info != null && objects != null ? String.format(info, objects) : info;
  }

  public RException(String code, String info) {
    this(null, null, code, info);
  }

  public RException(String info) {
    this(null, info);
  }

  public RException(Throwable cause) {
    super(cause);
  }

  public String getInfo() {
    return info;
  }

  public void setInfo(String info) {
    this.info = info;
  }



}
